package com.kly.user.db.dao;
import com.fqgj.common.base.BaseMapper;
import com.kly.user.db.entity.UserConversationChatterEntity;
import com.kly.user.db.entity.UserConversationEntity;

import java.util.Date;
import java.util.List;

/**
* User: user
* Date: 2024-02-27
* Time: 10:02:53.618
*/

public interface UserConversationChatterDao  extends BaseMapper<UserConversationChatterEntity> {

    int doDeleted(String userCode, String userCodeFriend);

    int insertConversation(UserConversationEntity userConversationEntity);

    void saveOrUpdate(UserConversationEntity record);

    /**
     * 小于时间的会话
     * @param latestTime
     * @return
     */
    List<UserConversationChatterEntity> getUserLastConversationList(Date latestTime);


    /**
     * 读取用户小于时间的会话
     * @param userCode
     * @param latestTime
     * @return
     */
    List<UserConversationChatterEntity> getConversationByUserCode(String userCode, Date latestTime);
}